FROM anolis-registry.cn-zhangjiakou.cr.aliyuncs.com/openanolis/openjdk:11-8.6

LABEL description="Apache Flink" version="1.20.0" owner="CQ" creator="CQ"
# 设置工作目录
WORKDIR /opt

# 设置环境变量
ENV FLINK_HOME /opt/flink
RUN yum -y update \
    && yum install -y wget ;
RUN wget https://dlcdn.apache.org/flink/flink-1.20.0/flink-1.20.0-bin-scala_2.12.tgz \
    && tar -zxvf flink-1.20.0-bin-scala_2.12.tgz \
    && rm -rf flink-1.20.0-bin-scala_2.12.tgz \
    && mv flink-1.20.0 flink \
    && sed -i 's/address: localhost/address: 0.0.0.0/g' /opt/flink/conf/config.yaml \
    && sed -i 's/bind-address: localhost/bind-address: 0.0.0.0/g' /opt/flink/conf/config.yaml

EXPOSE 6123
EXPOSE 8081

CMD ["sh", "-c", "$FLINK_HOME/bin/start-cluster.sh && tail -f /dev/null"]



